Class Neuron

java.lang.Object
edu.uky.ai.ml.nn.Neuron
Direct Known Subclasses:
InputNeuron

public class Neuron
extends java.lang.Object
A neuron is the fundamental building block of a neural network and is meant to roughly parallel a biological neuron. A neuron has a value as well as some number of edges leading to and from it.
Author:
Stephen G. Ware
  • Field Summary

    Fields 
    Modifier and Type Field Description
    java.lang.Iterable<Edge> children
    All edges leading away from this neuron to another neuron
    java.lang.Iterable<Edge> parents
    All edges leading to this neuron from another neuron
  • Constructor Summary

    Constructors 
    Constructor Description
    Neuron()  
  • Method Summary

    Modifier and Type Method Description
    double getValue()
    Returns the current value of this neuron based on the input it is receiving from its parents and its activation functions, which in this case is the sigmoid function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • parents

      public final java.lang.Iterable<Edge> parents
      All edges leading to this neuron from another neuron
    • children

      public final java.lang.Iterable<Edge> children
      All edges leading away from this neuron to another neuron
  • Constructor Details

  • Method Details

    • getValue

      public double getValue()
      Returns the current value of this neuron based on the input it is receiving from its parents and its activation functions, which in this case is the sigmoid function.
      Returns:
      the neuron's value